<%@ page contentType="text/html" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="layout" uri="http://code.google.com/p/layout4j/" %>
<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Layout4j examples</title>
        <link rel="stylesheet" type="text/css" href="css/layout.css" />
        <link rel="stylesheet" type="text/css" href="css/content.css" />
    </head>
    <body>
        <h1>Layout4j examples</h1>
        <h2>Rows with columns</h2>
        <c:set var="source">
			<layout>
			  <row>
			    <column>
			      <content data-id="1" data-type="1" style="1" />
			      <content data-id="2" data-type="1" style="1" />
			    </column>
			    <column>
			      <content data-id="3" data-type="2" style="2" />
			    </column>
			  </row>
			  <row>
			      <content data-type="3" style="3" />
			  </row>
			</layout>
        </c:set>
        
        <layout:renderDefault source="${source}" contentBaseUrl="/content.jsp?" />
        
        <h2>Nested columns</h2>
        
        <c:set var="source">
	        <layout num-cols="3">
			  <column num-cols="2">
			    <row>
			      <column>
			        <content data-id="1" data-type="1" style="1" />
			        <content data-id="2" data-type="1" style="1" />
			      </column>
			      <column> 
			        <content data-id="3" data-type="1" style="2"/>
			      </column>
			    </row>
			    <row>
			      <content data-id="4" data-type="1" style="3" />
			    </row>
			  </column>
			  <column>
			      <content data-id="5" data-type="1" style="1" />
			      <content data-id="6" data-type="1" style="1" />
			      <content data-id="7" data-type="1" style="1" />
			      <content data-id="8" data-type="1" style="1" />
			      <content data-id="9" data-type="1" style="1" />
			  </column>
			</layout>
		</c:set>
		
		<layout:renderDefault source="${source}" contentBaseUrl="/content.jsp?" />
    </body>
</html>
